#pragma once

#include <set>
#include "TemplateName.h"
#include "Component.h"
#include "LaserRadar.h"
#include "Chassis.h"

class TemplateCenter
{
private:
    // 单例模板中心 
    static TemplateCenter* templateCenter;
    // 用于保存模板组件名称
    set<string> nameSet;
    TemplateCenter();
    ~TemplateCenter();
public:
    static void initTemplateCenter();
    static void deleteTemplateCenter();
    static TemplateCenter* getTemplateCenter();
    bool isTemppateConponent(string name);
    Component* createComponent(string name);
    Component* copyComponent(string name,Component* component);
    LaserRadar* switchToLaser(Component* component);
    Chassis* switchToChassis(Component* component);
};

